#ifndef MOTORPAGEPRESENTER_HPP
#define MOTORPAGEPRESENTER_HPP

#include <gui/model/ModelListener.hpp>
#include <mvp/Presenter.hpp>

using namespace touchgfx;

class MotorPageView;

class MotorPagePresenter : public touchgfx::Presenter, public ModelListener
{
public:
    MotorPagePresenter(MotorPageView& v);

    /**
     * The activate function is called automatically when this screen is "switched in"
     * (ie. made active). Initialization logic can be placed here.
     */
    virtual void activate();

    /**
     * The deactivate function is called automatically when this screen is "switched out"
     * (ie. made inactive). Teardown functionality can be placed here.
     */
    virtual void deactivate();

    virtual ~MotorPagePresenter() {};
		//电机与蜂鸣器控制
		void turnFanStatus(bool enable);
		void turnMotorStatus(bool enable);
		void turnBuzzerStatus(bool enable);
		//物理按键的页面跳转
		virtual void MotorPageChange(uint8_t newFiveKeyFunc);
		//MotorPagePresenter状态
		void MotorPagePresenterState(bool enable);
private:
    MotorPagePresenter();

    MotorPageView& view;
};

#endif // MOTORPAGEPRESENTER_HPP
